package com.my.client;

import java.lang.reflect.Proxy;

public class MyRpc {
    public static <T> T createByJdkProxy(Class<T> clz, String remoteUrl) {
        return (T) Proxy.newProxyInstance(MyRpc.class.getClassLoader(), new Class[] { clz }, new MyRpcInvocationHandler(clz, remoteUrl));
    }
}
